← Back to issue list

Setting the snapcraft.yaml version field to 'git' produces undocumented and broken magic

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1769519
Type
issue
State
open
Author
~njmcphail
Labels
Created
2018-05-06 22:55:57.873977+00:00
Updated
2018-05-11 18:45:02.647828+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

I've found that if the version: field in snapcraft.yaml is set to 'git', snapcraft does some magic where a mangled form of `git describe` is substituted into the version: field. This seems like a superb feature, although it is missing from the documentation. However, if the latest tag in the git repository contains invalid characters such as an underscore, the resultant snap will have an invalid version string and snap will refuse to install the package. Snapcraft itself does not produce an error. I'd suggest this piece of magic is either fixed (perhaps substituting '-' characters for invalid characters) or removed. (snapcraft version 2.42 on 16.04)

Evaluation history

No evaluation history available.